	<?php $this->load->view('admin/partials/feed_menu'); ?>
	
	<?php 
		$type = $_GET['type']; 
		$linkArray = defineFeedArrayData();
		$linkArr = $linkArray[$type];
		$tmpArr = array();
		$i = 0;
		foreach($linkArr as $k=>$a){
			$tmpArr[$i++] = array('link'=>site_url("admin/dataman/feed/parser")."?type=$type&key=".getKey($a['link']), 'title'=>$a['title']);
		}
		$size = sizeof($tmpArr);
		
		function getKey($link){
			return substr( $link, strrpos( $link, '/' )+1,strlen($link) );
		}
	?>
	
	<div class="clrboth"></div>
	<h3><?php echo $type;?></h3>
	<div class="clrboth"></div>
	
	<table border="0" class="table-list">
		<thead>
			<tr>
				<th width="100%" colspan="3">Title</th>
			</tr>
		</thead>
		
		<tbody>
			<?php $i=0;while($i<$size):?>
				<?php 
					$j=$i; 
				?> 
				<tr>
					<?php if(isset($tmpArr[$j])): ?>
						<td><a href="<?php echo $tmpArr[$j]['link'];?>"><?php echo $tmpArr[$j]['title'];?></a></td>
					<?php endif;?>
					<?php if(isset($tmpArr[$j+1])): ?>
						<td><a href="<?php echo $tmpArr[$j+1]['link'];?>"><?php echo $tmpArr[$j+1]['title'];?></a></td>
					<?php endif;?>
					<?php if(isset($tmpArr[$j+2])): ?>
						<td><a href="<?php echo $tmpArr[$j+2]['link'];?>"><?php echo $tmpArr[$j+2]['title'];?></a></td>
					<?php endif;?>	
				</tr>
				<?php $i=$j+3;?>
			<?php endwhile;?>
		</tbody>
	</table>

<script type="text/javascript">
	jQuery(document).ready(function() {
		
	});
	
	
</script>	

